package com.buffer.agent.tool;


import org.springframework.stereotype.Component;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

@Component
public class TimeQueryTool implements AgentTool {
    @Override
    public ToolType getType() {
        return ToolType.TIME_QUERY;
    }
    
    @Override
    public ToolResult execute(String param) {
        // 获取当前系统时间
        String currentTime = LocalDateTime.now()
                .format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
        return new ToolResult(true, "当前系统时间：" + currentTime);
    }
}